﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Drawing;

namespace MyChart
{
    /// <summary>
    /// 图表控件的数据项
    /// </summary>
    public class ChartItem
    {
        #region 字段

        private string _text = "";
        private string _value = "";
        private Color _color = new Color();

        private DataRowView _row;

        #endregion

        #region 属性

        /// <summary>
        /// 获取或设置数据项的文本
        /// </summary>
        public string Text
        {
            get { return _text; }
            set { _text = value; }
        }

        /// <summary>
        /// 获取或设置数据项的值
        /// </summary>
        public string Value
        {
            get { return _value; }
            set { _value = value; }
        }

        /// <summary>
        /// 获取或设置数据项的颜色
        /// </summary>
        public Color Color
        {
            get { return _color; }
            set { _color = value; }
        }

        /// <summary>
        /// 获取或设置数据项对应的数据源中的数据行视图
        /// </summary>
        public DataRowView Row
        {
            get { return _row; }
            set { _row = value; }
        }

        #endregion
    }
}
